import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n= scan.nextInt();
        int i=0;
        int flag=1;
        for(i=2;i<n;i++)
        {
            if(n%i==0)
            {
                flag=0;
                break;
            }
        }
        if(flag==1)
            System.out.printf("%d是质数",n);
        else
            System.out.printf("%d不是质数",n);
    }
}
